#coding: utf-8 or # -*- coding: utf-8 -*-

from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker, scoped_session
from sqlalchemy import (create_engine, MetaData, Column, Integer, String)


def get_Session():
    #engine = create_engine('oracle://card_vip:123456@card')
    #engine = create_engine('oracle://LACARD:222222@LAORCL')
    #engine = create_engine('oracle://CARD_VIP:123456@10.10.10.45:1521/CARD')
    engine = create_engine('oracle://qy_card:111111@192.168.56.210:1521/orcl')
    DBSession = sessionmaker(bind=engine) 
    # Session =sessionmaker( autocommit=False, autoflush=False, bind=engine)
    return DBSession


DBSession = get_Session()()
print DBSession
#engine = create_engine('oracle://qy_card:111111@192.168.56.210:1521/orcl')
